<?php
/**
 * 获取PAGE的URL
 * @param  array
 * @return [type]
 */
function page_helper_get_url($page_data = array()) {
	$hash = $page_data['hash'];
	//获取发布时间
	$t = strtotime($page_data['publish_time']);
	$d = date("Y/m/d", $t);
	//文件保存路径
	$url_root = '/p/' . $d . DIRECTORY_SEPARATOR;
	$url = $url_root . $hash . '.html';
	return $url;
}

/**
 * 获取菜单
 * @param  integer
 * @return [type]
 */
function page_helper_get_menu($menu_id = 0) {
	require_once APP_PATH . DIRECTORY_SEPARATOR . 'menu/model.php';
	return menu_model_get_by_id($menu_id);
}